package com.china.produce.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @ClassName
 * @Author niujie
 * @Version
 * @Description
 * @CreateTime 2025/7/23
 */
@Getter
@AllArgsConstructor
public enum ProductTypeEnum {

    INK("001", "墨水"),

    MACHINE("002", "机器");

    private String code;

    private String desc;

    public static ProductTypeEnum getByCode(String code)
    {
        for (ProductTypeEnum value : values())
        {
            if (value.code.equals(code))
            {
                return value;
            }
        }
        return null;
    }
}
